package edu.nju.desserthouse.action.business;

import java.io.Serializable;
import java.util.ArrayList;

public class VipAddrInfoBean implements Serializable{
	
	private static final long serialVersionUID = 1L;
	
	private ArrayList<Double> addrNum = new ArrayList<Double>();
	private ArrayList<Double> addrRatio = new ArrayList<Double>();
	private ArrayList<String> addrList = new ArrayList<String>();
	
	public int getAddrSize(){
		return addrList.size();
	}
	
	public String getAddr(int i){
		return addrList.get(i);
	}
	
	public double getAddrNum(int i){
		return addrNum.get(i);
	}
	
	public double getAddrRatio(int i){
		return addrRatio.get(i);
	}
	public void initAddrNumList(){
		for(int i = 0; i < addrList.size(); i++){
			addrNum.add(i, 0.0);
			addrRatio.add(i, 0.0);
		}
	}
	
	public void addToNum(int index){
		double value = addrNum.get(index);
		value++;
		addrNum.set(index, value);
	}
	
	public void setAddrList(ArrayList<String> addrList){
		this.addrList = addrList;
	}
	
	public void setRatio(int index, double ratio){
		addrRatio.set(index, ratio);
	}
}
